package com.lipi.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lipi.common.utils.PageUtils;
import com.lipi.mall.product.entity.AttrEntity;
import com.lipi.mall.product.vo.AttrGroupRelationVO;
import com.lipi.mall.product.vo.AttrRespVO;
import com.lipi.mall.product.vo.AttrVO;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author hecy
 * @email kuanih200@163.com
 * @date 2021-06-14 16:02:24
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVO attr);

    PageUtils queryPage(Map<String, Object> params, Long categoryId, String attrType);

    AttrRespVO getAttrInfo(Long attrId);

    void updateByAttr(AttrVO attrVO);

    public List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(AttrGroupRelationVO[] vos);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    /**
     * 传入一个ids集合，返回集合中可以被检索的ids
     *
     * @param attrIds
     * @return
     */
    List<Long> selectSearchAttrs(List<Long> attrIds);
}

